﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true" CodeFile="ChiTietHoaDon.aspx.cs" Inherits="Admin_ChiTietHoaDon" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script src="../Scripts/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            activeMenu(6, 0);
        });
    </script>
    <div class="divsize">
        <asp:HiddenField ID="HoaDonID" runat="server" />
         <fieldset>
            <legend>Chi tiết Hóa đơn</legend>
            <asp:Label ID="messageKetQua" runat="server" Text=""></asp:Label>
            <ol class="form form-clear">
                <li>
                    <label>Mã Chi Tiết HD</label>
                    <asp:TextBox ID="txtMaCTHD" Enabled="false" runat="server"></asp:TextBox>
                </li>
                    <li>
                        <label>Mã Hóa đơn</label>
                        <asp:DropDownList ID="cbMaHD" runat="server" Width="210px"></asp:DropDownList>
                    </li>
                    <li>
                        <label>Mã Vac-xin</label>                        
                        <asp:DropDownList ID="cbMaVC" runat="server" Width="210px"></asp:DropDownList>
                    </li>
                    <li>
                        <label>Số lượng</label>
                        <asp:TextBox ID="txtSoLuong" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Thành tiền</label>
                        <asp:TextBox ID="txtThanhTien" runat="server"></asp:TextBox>
                    </li>
                <li>                    
                    <asp:Button ID="btnThem" runat="server" CssClass="btn primary" Text="Thêm mới" Visible="true" />
                    <asp:Button ID="btnCapNhatSua" runat="server" CssClass="btn primary" Text="Cập nhật sửa" Enabled="false" />
                </li>
            </ol>
        </fieldset>
    </div>
    <div>
        <fieldset>
            <asp:ListView ID="ListViewCTHoaDon" runat="server" >
            <%-- OnItemCommand="ListViewCTHoaDon_OnItemCommand"
                            OnItemDeleting="ListViewCTHoaDon_OnItemDeleting"
                            OnItemUpdating="ListViewCTHoaDon_OnItemUpdating" --%>
                <LayoutTemplate>
                    <table border="1">
                        <tr>
                            <th>Mã CT Hóa đơn</th>
                            <th>Mã Hóa đơn</th>
                            <th>Mã VC</th>
                            <th>Số lượng</th>
                            <th>Thành tiền</th>
                            <th>Thao tác</th>
                        </tr>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%# Eval("MaCTHD") %></td>
                        <td><%# Eval("MaHD") %></td>
                        <td><%# Eval("MaVC") %></td>
                        <td><%# Eval("SoLuong") %></td>
                        <td><%# Eval("ThanhTien") %></td>
                        <td>
                            <asp:LinkButton ID="LinkButtonSua" ToolTip="Sửa thông tin" runat="server" 
                                            CommandArgument='<%#Eval("MaCTHD") %>' CommandName="Update">Sửa</asp:LinkButton>
                            |
                            <asp:LinkButton ID="LinkButtonXoa" ToolTip="Xóa bản ghi này" runat="server" 
                                            CommandArgument='<%#Eval("MaCTHD") %>' CommandName="Delete" 
                                            ForeColor="Brown" OnClientClick="return confirm('Bạn chắc chắn muốn xóa?')">Xóa</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
            <asp:Label ID="lableNull" runat="server" Enabled="false" Text="Không có việc gì khó, chỉ sợ lòng không bền."></asp:Label>
        </fieldset>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <ul class="m-melanin-vertical-navigation">
         <li>
                <span class=" ss_sprite ss_shield">&nbsp;</span>
                <a id="A4" href="HoaDon.aspx" class="m-melanin-vertical-navigation-link">Hóa đơn/a>
          </li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
    <asp:Button ID="button_create_cthoadon" runat="server" CssClass="btn small primary" Text="Thêm chi tiết" />
</asp:Content>

